package com.create.rdjc.util;

import com.create.rdjc.config.Config;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class ExcelUtils {
    private Properties dataType = new Properties();

    public ExcelUtils(){
        InputStream in = this.getClass().getClassLoader().getResourceAsStream(Config.mysqlToRdjcDataType);
        try {
            dataType.load(in);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }


    public String getDataType(String name){
        return dataType.get(name).toString();
    }

    public String getDataType(String type,Integer length){
        return String.format(dataType.get(type).toString(),length);
    }
}
